﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace Jy123.Web.PersonalInfo
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class DelCompany : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            //string strUserIdFromCookie = Common.Cookie.getCookie("UserID");
            //if (string.IsNullOrEmpty(strUserIdFromCookie))
            //{
            //    context.Response.Redirect("/");
            //}
            string msg = string.Empty;
            string strCareerID = context.Request["CareerID"];
            if (!string.IsNullOrEmpty(strCareerID))
            {
                new Jy123.BLL.User_Career().Delete(Convert.ToInt32(strCareerID));
                msg = "删除成功！,ok";
            }
            else if (strCareerID == "show")
            {
                msg = "";
            }
            else
            {
                msg = "操作失败!,warning";
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write(msg);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
